const gulp = require("gulp");

gulp.task("copyTask",function(done){
    // console.log("copyTask");
    // let data = gulp.src("./src/01.js");
    // console.log(data);
    gulp.src("./src/01.js")
        .pipe(gulp.dest("./dist/"));
    done();
});


function copy1(done){
    gulp.src("./src/01.js").pipe(gulp.dest("./dist/"));
    done();
}
exports.copy1=copy1;

function copy2(done){
    // gulp.src("./src/**/01.js")
    // gulp.src("./src/**/*")
    gulp.src("./src/**/*.js")
    .pipe(gulp.dest("./dist/"));
    done();
}
exports.copy2=copy2;

function copy3(done){
    gulp.src(["./src/**/*","!./src/**/*.css"])
    .pipe(gulp.dest("./dist/"));
    done();
}

exports.copy3=copy3;

const watcher=function(){
    gulp.watch("./src/",{
        ignoreInitial:false
    },copy2);
}

// exports.watcher=watcher;
exports.default=watcher;